<template>
	<image-viewer
		v-if="visible"
		style="z-index: 99999"
		:on-close="handleClose"
		:url-list="urlList"
	/>
</template>

<script>
export default {
	components: {
		'image-viewer': () =>
			import('element-ui/packages/image/src/image-viewer')
	},
	props: {
		visible: {
			type: Boolean,
			default: false
		},
		urlList: {
			type: Array,
			default: () => []
		}
	},
	methods: {
		handleClose() {
			this.$emit('update:visible', false)
		}
	}
}
</script>
